import { fileURLToPath, URL } from "node:url";

import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";



// https://vite.dev/config/
export default defineConfig({
  test: {
    environment: "jsdom",
    // 测试文件的匹配模式，这里匹配所有以.test.js或.test.ts结尾的文件
    include: ["**/*.test.{js,ts}"],
    globals: true, // 允许全局变量
    alias: {
      "@": fileURLToPath(new URL("./src", import.meta.url)),
    },
  },
  plugins: [
    vue()
  ],
  resolve: {
    alias: {
      "@": fileURLToPath(new URL("./src", import.meta.url)),
    },
  },
  server: {
    port: 8181,

  },
});
